{% extends "main.html" %}

{% block title %} 我喜欢的{{type_nick}} - {% endblock %}
{% block keyword %}{{keyword}}{% endblock %}

{% block head %}
<style>
.del-btn{
	padding: 2px;color: rgb(255, 127, 7);text-align: center;display: block;
}
</style>
{% endblock %}

{% block container %}
<div class="container-fluid">
      <div class="row">
		  <div id="waterfall">
				{% for item in data %}
					<div class="item">
						<a class="movie-box" href="/{{type_name}}/{{ item[type_url] }}" title="{{item.time}}">
							<div class="photo-frame">
								<img src="{{ cdn }}/digital/video{{ item.smallimage }}" title="">
							</div>
							<div class="photo-info">
								<span>{{type_nick}}:{{ item[type_name] }}
									<br>
									<date>{{ item.av_id }}</date> /
									<date>{{ item.release_date }}</date>
								</span>
							</div>
						</a>
						<span class="glyphicon glyphicon-remove del-btn" data-typeurl="{{type_url}}" data-val="{{item[type_url]}}"></span>

					</div>

				{% endfor %}
			</div>
		  </div>
</div>
{% endblock %}

{% block javascript %} 
<script>
	// $('#avatar-waterfall > div > span').each(function () {
	//     $(this).after('<span class="glyphicon glyphicon-remove del-btn" data-toggle="modal" data-target="#myModal" style="padding: 2px;color: #FFC107;"></span>');
	// });
	$('.del-btn').click(function () {
		$.get("/like/del/{{type_url}}/" + $(this).data('val'), function (data) {
			$('#message_title').html(data);
			$('#message').modal('show');
		});
	});
</script>
{% endblock %}

{% block pagination %}
{% endblock %}